<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateInvoiceRisesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('invoice_rises', function (Blueprint $table) {
            $table->increments('invoice_rise_id')->comment("发票抬头id");
            $table->engine = "innodb";
            $table->integer("user_id")->index()->comment("用户id");
            $table->string('company_name', 100)->default('')->comment("公司名称");
            $table->string('taxation_number', 100)->unique()->index()->comment("税号");
            $table->string('company_address', 500)->default('')->comment("公司地址");
            $table->string('company_tel', 30)->default('')->comment("公司电话");
            $table->string('bank_name', 50)->default('')->comment("开户银行");
            $table->string('bank_account', 30)->default('')->comment("银行账户");
            $table->boolean("status")->default(0)->comment("是否启用");
            $table->boolean("is_delete")->default(0)->comment("是否删除");
            $table->timestamps();
            $table->timestamp('create_time')->index()->comment("创建时间");
            $table->timestamp('end_time')->index()->comment("截止时间");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('invoice_rises');
    }
}
